package com.shop.domain.system;

import com.alibaba.fastjson.annotation.JSONField;

import com.shop.jpa.domain.BaseDomain;
import com.shop.jpa.support.JpaConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>实体类</p>
 * <p>Table: t_version - APP版本更新表</p>
 * @author generator
 * @date 2020-11-20 09:04:40
 */
@ApiModel("version APP版本更新表")
@Data
@Entity
@Table(name="t_version")
@SQLDelete(sql = "update t_version set is_deleted = 1 where id = ?")
@Where(clause = JpaConst.WHERE_CLAUSE_NOT_DELETED)
@DynamicInsert(true)
@DynamicUpdate(true)
public class Version extends BaseDomain implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "id", hidden = true)
    @Column(name = "id")
    @JSONField(serialize=false)
    private Long id;


    @Column(name = "download_url")
    @ApiModelProperty("下载地址")
    private String downloadUrl;

    @Column(name = "is_new")
    @ApiModelProperty("是否强制更新 0 否 1是")
    private Integer isNew;

    @Column(name = "version")
    @ApiModelProperty("版本号")
    private String version;

    @Column(name = "version_depict")
    @ApiModelProperty("版本描述说明")
    private String versionDepict;

    @Column(name = "version_type")
    @ApiModelProperty("版本类型 android ios")
    private String versionType;

    @Column(name = "version_code")
    @ApiModelProperty("匹配IOS打包更新")
    private Integer versionCode;

    /**
	 * 创建时间
	 */
	@Column(name = "create_time")
    @ApiModelProperty("创建时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;


    /**
	 * 最后一次更新时间
	 */
	@Column(name = "update_time")
    @ApiModelProperty("最后一次更新时间")
    @JSONField(serialize=false)
    private Date updateTime;

    /**
	 * 是否删除 0：不删除   1：删除
	 */
	@Column(name = "is_deleted")
    @ApiModelProperty("是否删除 0：不删除   1：删除")
    @JSONField(serialize=false)
    private Integer isDeleted;




}